import 'package:flutter_taotaoshipin/generated/json/base/json_convert_content.dart';
import 'package:flutter_taotaoshipin/model/buy_drama_pay_entity.dart';

BuyDramaPayEntity $BuyDramaPayEntityFromJson(Map<String, dynamic> json) {
  final BuyDramaPayEntity buyDramaPayEntity = BuyDramaPayEntity();
  final bool? isBuy = jsonConvert.convert<bool>(json['is_buy']);
  if (isBuy != null) {
    buyDramaPayEntity.isBuy = isBuy;
  }
  final String? msg = jsonConvert.convert<String>(json['msg']);
  if (msg != null) {
    buyDramaPayEntity.msg = msg;
  }
  return buyDramaPayEntity;
}

Map<String, dynamic> $BuyDramaPayEntityToJson(BuyDramaPayEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['is_buy'] = entity.isBuy;
  data['msg'] = entity.msg;
  return data;
}

extension BuyDramaPayEntityExtension on BuyDramaPayEntity {
  BuyDramaPayEntity copyWith({
    bool? isBuy,
    String? msg,
  }) {
    return BuyDramaPayEntity()
      ..isBuy = isBuy ?? this.isBuy
      ..msg = msg ?? this.msg;
  }
}